<?php
class View
{
	const VIEW_NOT_FOUND = 2001;
	
	private function __construct(){}
	
	static public function display($viewName, $params = array()){
		$path = 'views/'.$viewName.'.view.php';
		if(!file_exists($path)){
			throw new Exception('View file not found', self::VIEW_NOT_FOUND);
		}
		include $path;
	}
}